/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.contract.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.contract.dto.ContractHistoryTradeDTO;
import com.pig4cloud.pigx.contract.entity.ContractTrade;
import com.pig4cloud.pigx.contract.vo.ContractStatisticsHandlingFeeVO;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 成交记录表
 *
 * @date 2022-08-11 10:08:52
 */
public interface ContractTradeService extends IService<ContractTrade> {

    /**
     * 获取历史成交记录
     *
     * @param page 分页
     * @param dto  查询条件
     * @return
     */
    R getHistoryTrade(Page page, ContractHistoryTradeDTO dto);

    /**
     * 财务 -> 手续费统计报表
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return list
     */
    List<ContractStatisticsHandlingFeeVO> statisticsHandlingFee(LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 财务 -> 手续费统计报表 导出excel
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return
     */
    HSSFWorkbook excel(LocalDateTime startTime, LocalDateTime endTime);

}
